function enableControl(textField)
{
	if (textField.value == enterRequestPhrase) {
		textField.value = '';
		textField.className = '';
	}
}

function disableControl(textField)
{
	if (textField.value == '') {
		textField.value = enterRequestPhrase;
		textField.className = 'disabled';
	}
}

window.onload = function () {
	disableControl(document.getElementById('search-field'));
}


function applyTag(phrase)
{
	var search_field = document.getElementById('search-field');
	enableControl(search_field);
	
	search_field.value = phrase;
	search_field.form.submit();
}